<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8"></meta>
<script type="text/javascript" src="/js/vue.js"></script>
<title>Vue.js</title>
</head>
<body>
	<h1>Hello World</h1>
	<hr></hr>
	<div id="app">
		<p>{{num}}</p>
		<button v-on:click="add(5)" >ADD</button>
	</div>
	
	<script type="text/javascript">
		var app = new Vue({
			el:'#app',
			data:{
				num:1
			},
			methods:{
				add:function(a){
					if(a!=''){
						this.num+=a;
					}else{
						this.num++;
					}
					
				}
			}
		});
	</script>
</body>
</html>